package si.yun;

import com.github.tobato.fastdfs.FdfsClientConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.logging.Logger;

/**
 * @program: SiYunClass
 * @description:
 * @author: 崔晓晨
 * @create: 2021-07-04 18:45
 **/

@SpringBootApplication/*(exclude={SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class})*/
@ServletComponentScan//扫描监听器，过滤器，servlet
@EnableTransactionManagement//开起事务
@MapperScan("si.yun.dao")//扫描映射文件
@Import(FdfsClientConfig.class)
public class Run extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(Run.class);

    }

     public static void main(String[] args){
        SpringApplication.run(Run.class, args);
        Logger logger = Logger.getGlobal();
         logger.info("  分支");
        logger.info(" ######  #### ##    ## ##     ## ##    ##  ");
        logger.info(" ######  #### ###    ## ##     ## ##    ## ");
        logger.info("##    ##  ##   ##  ##  ##     ## ###   ## ");
        logger.info("##        ##    ####   ##     ## ####  ## ");
        logger.info(" ######   ##     ##    ##     ## ## ## ## ");
        logger.info("      ##  ##     ##    ##     ## ##  #### ");
        logger.info("##    ##  ##     ##    ##     ## ##   ### ");
        logger.info(" ######  ####    ##     #######  ##    ## ");
        logger.info("Startup...OK");
    }


}